package lanxing.bootstrap.json;

import java.io.FileNotFoundException;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author <a href="mailto:lanxing@chances.com.cn">lanxing</a>
 * @version 2019年7月16日
 *
 */
@RestController
@RequestMapping("/data")
public class LoadTextDataController {

    @Autowired
    LoadTextDataService loadTextDataService;

    @GetMapping("/update")
    public BaseResponse updateData() throws FileNotFoundException {
        BaseResponse result = new BaseResponse();

        loadTextDataService.reload();

        return result;
    }
}
